<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Install.aspx.cs" Inherits="Install" %>
<%@ Import Namespace="Evpo.DocCirc.MySqlDL" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <link rel="stylesheet" type="text/css" href="css/StyleSheet.css" />
    <title><%#_rm.GetString(ResKeys.Title)%></title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:HiddenField ID="hidSessionId" runat="server" />
        
        <table border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td align="center" style="height: 22px">
                    <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Size="Larger"><%# _rm.GetString(ResKeys.Introduction) %></asp:Label>
                    <br />
                    <br />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Wizard ID="Wizard1" runat="server" ActiveStepIndex="0" DisplaySideBar="False" OnNextButtonClick="Wizard1_NextButtonClick"
                        FinishCompleteButtonText="<%#_rm.GetString(ResKeys.FinishWizardButton) %>"
                        StepNextButtonText="<%#_rm.GetString(ResKeys.NextWizardButton) %>" 
                        StartNextButtonText="<%#_rm.GetString(ResKeys.NextWizardButton) %>"
                        FinishPreviousButtonText="<%#_rm.GetString(ResKeys.PreviousWizardButton) %>"
                        StepPreviousButtonText="<%#_rm.GetString(ResKeys.PreviousWizardButton) %>" 
                        OnFinishButtonClick="Wizard1_FinishButtonClick">
                        
                        <WizardSteps>
                            <asp:WizardStep ID="WizardStep1" runat="server" Title="<%# _rm.GetString(ResKeys.DatabaseConnectionStep) %>" >
                                <table border="0" style="border-right: black 1px solid; border-top: black 1px solid; border-left: black 1px solid; width: 700px; border-bottom: black 1px solid" bgcolor="lightgrey">
                                    <tr>
                                        <td>
                                            <asp:Label ID="uiMySqlServerMachineNameLabel" runat="server" Font-Bold="True"><%# _rm.GetString(ResKeys.MySqlServerMachineName) %></asp:Label>
                                        </td>
                                        <td style="text-align: right">
                                            <asp:TextBox ID="uiMySqlMachineName" runat="server" Text="<%# DatabaseInstaller.Const.MachineName %>" style="width: 200px" Width="200px"></asp:TextBox>
                                        </td>
                                            
                                    </tr>
                                    <tr>
                                        <td colspan="2" style="text-align: justify">
                                            <asp:Label ID="uiMySqlMachineNameComment" runat="server"><%# _rm.GetString(ResKeys.MySqlServerMachineNameComment) %></asp:Label>         
                                            <br />
                                            <br />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="uiMySqlPortLabel" runat="server" Font-Bold="True"><%# _rm.GetString(ResKeys.MySqlPort) %></asp:Label>
                                        </td>
                                        <td style="text-align: right">
                                            <asp:TextBox ID="uiMySqlPort" runat="server" Text="<%# DatabaseInstaller.Const.Port %>" Width="200px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" style="text-align: justify">
                                            <asp:Label ID="uiMySqlPortComment" runat="server"><%# _rm.GetString(ResKeys.MySqlPortComment) %></asp:Label>
                                            <br />
                                            <br />
                                        </td>
                                    </tr>
                                    
                                    <tr>
                                        <td>
                                            <asp:Label ID="uiDatabaseAdministratorAccount" runat="server" Font-Bold="True"><%# _rm.GetString(ResKeys.DatabaseAdministratorAccount) %></asp:Label>
                                        </td>
                                        <td style="text-align: right">
                                            <asp:TextBox ID="uiDatabaseAdministrator" runat="server" Text="<%# DatabaseInstaller.Const.Admin %>" Width="200px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="uiPasswordLabel" runat="server" Font-Bold="True"><%# _rm.GetString(ResKeys.DatabaseAdministratorPassword) %></asp:Label>
                                        </td>
                                        <td style="text-align: right">
                                            <asp:TextBox ID="uiDatabaseAdministratorPassword" runat="server" TextMode="Password" Width="200px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    
                                    <tr>
                                        <td colspan="2" style="text-align: justify">
                                            <asp:Label ID="uiDatabaseAdministratorComment" runat="server"><%# _rm.GetString(ResKeys.DatabaseAdministratorAccountComment) %></asp:Label>
                                            <br />
                                            <br />
                                        </td>
                                    </tr>
                                </table>
                                
                                
                                
                            </asp:WizardStep>
                            <asp:WizardStep ID="WizardStep2" runat="server" Title="<%# _rm.GetString(ResKeys.CreateNewDatabase) %>">
                                <table style="border-right: black 1px solid; border-top: black 1px solid; border-left: black 1px solid; width: 700px; border-bottom: black 1px solid" bgcolor="lightgrey">
                                    <tr>
                                        <td align="center" colspan="2">
                                            <asp:Label ID="uiCreateDatabaseIntroduction" runat="server"><%# _rm.GetString(ResKeys.CreateDatabaseIntroduction) %></asp:Label>
                                            <br />
                                            <br />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="uiDatabaseNameLabel" runat="server" Font-Bold="True"><%# _rm.GetString(ResKeys.DatabaseNameLabel) %></asp:Label> 
                                        </td>
                                        <td style="text-align: right">
                                            <asp:TextBox ID="uiDatabaseName" runat="server" Text="<%# DatabaseInstaller.Const.DatabaseName %>" />
                                        </td>
                                    </tr>
                                    <tr><td colspan="2"><br /></td></tr>
                                    <tr>
                                        <td colspan="2" style="text-align: center">
                                            <asp:CheckBox CssClass="checkBox" ID="uiCreateDatabase" runat="server" Text="<%# _rm.GetString(ResKeys.CreateNewDatabaseCheckBox) %>" Font-Bold="True" Checked="True" /> 
                                        </td>
                                    </tr>
                                    <tr><td colspan="2" style="text-align: justify"><asp:Label runat="server" ID="uiCreateNewDatabaseComment" ><%# _rm.GetString(ResKeys.CreateNewDatabaseComment) %></asp:Label></td></tr>
                                </table>
                                
                                
                            </asp:WizardStep>
                            <asp:WizardStep ID="WizardStep3" runat="server">
                                <table style="border-right: black 1px solid; border-top: black 1px solid; border-left: black 1px solid; width: 700px; border-bottom: black 1px solid" bgcolor="lightgrey">
                                    <tr>
                                        <td align="center" colspan="2" style="text-align: center">
                                            <asp:Label ID="uiCreateUserIntroduction" runat="server"><%# _rm.GetString(ResKeys.CreateUserIntroduction) %></asp:Label>
                                        </td>
                                    </tr>
                                    <tr><td colspan="2"><br /></td></tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="uiServiceUserLabel" runat="server" Font-Bold="True"><%# _rm.GetString(ResKeys.ServiceUserLabel) %></asp:Label>
                                        </td>
                                        <td style="text-align: right">
                                            <asp:TextBox ID="uiServiceUser" runat="server" Width="200px" Text="<%# DatabaseInstaller.Const.ServiceUserName %>"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="uiServiceUserPasswordLabel" runat="server" Font-Bold="True"><%# _rm.GetString(ResKeys.ServiceUserPasswordLabel) %></asp:Label>
                                        </td>
                                        <td style="text-align: right">
                                            <asp:TextBox ID="uiServiceUserPassword" runat="server" TextMode="Password" Width="200px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" style="text-align: justify">
                                            <asp:Label ID="uiServiceUserComment" runat="server"><%# _rm.GetString(ResKeys.ServiceUserComment) %></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                            <br />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="uiApplicationUserLabel" runat="server" Font-Bold="True"><%# _rm.GetString(ResKeys.ApplicationUserLabel) %></asp:Label>
                                        </td>
                                        <td style="text-align: right">
                                            <asp:TextBox ID="uiApplicationUser" runat="server" Width="200px" Text="<%# DatabaseInstaller.Const.UserName %>"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="uiApplicationUserPasswordLabel" runat="server" Font-Bold="True"><%# _rm.GetString(ResKeys.ApplicationUserPasswordLabel) %></asp:Label>
                                        </td>
                                        <td style="text-align: right">
                                            <asp:TextBox ID="uiApplicationUserPassword" runat="server" TextMode="Password" Width="200px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" style="text-align: justify">
                                            <asp:Label ID="uiApplicationUserComment" runat="server"><%# _rm.GetString(ResKeys.ApplicationUserComment) %></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                                
                            
                            </asp:WizardStep>
                            <asp:WizardStep ID="WizardStep4" runat="server">
                                <table style="border-right: black 1px solid; border-top: black 1px solid; border-left: black 1px solid; width: 700px; border-bottom: black 1px solid" bgcolor="lightgrey">
                                    <tr>
                                        <td colspan="2" style="text-align: center">
                                            <asp:Label ID="uiAttachmentFolderIntroduction" runat="server"><%# _rm.GetString(ResKeys.AttachmentFolderIntroduction) %></asp:Label>
                                            <br />
                                            <br />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td nowrap="noWrap">
                                            <asp:Label ID="uiAttachmentFolderLabel" runat="server" Font-Bold="True"><%# _rm.GetString(ResKeys.AttachmentFolderLabel) %></asp:Label>
                                        </td>
                                        <td style="text-align: right">
                                            <asp:TextBox ID="uiAttachmentFolder" runat="server" Width="400px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" style="text-align: justify">
                                            <asp:Label ID="uiAttachmentFolderComment" runat="server"></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                            </asp:WizardStep>
                            <asp:WizardStep ID="WizardStep5" runat="server">
                                <table style="border-right: black 1px solid; border-top: black 1px solid; border-left: black 1px solid; width: 700px; border-bottom: black 1px solid" bgcolor="lightgrey">
                                    <tr>
                                        <td colspan="2" style="text-align: center">
                                            <asp:Label ID="uiNotificationSenderIntroduction" runat="server"><%# _rm.GetString(ResKeys.NotificationSenderIntroduction) %></asp:Label>
                                            <br />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" style="text-align: center">
                                            <asp:CheckBox CssClass="checkBox" ID="uiEmailNotificationEnabledCheckBox" runat="server" Font-Bold="True" Text="<%# _rm.GetString(ResKeys.EmailNotificationEnabledCheckBox) %>" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" style="text-align: justify">
                                            <asp:Label ID="uiEmailNotificationEnabledComment" runat="server"><%# _rm.GetString(ResKeys.EmailNotificationEnabledComment) %></asp:Label>
                                            <br />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="uiSmtpServerLabel" runat="server" Font-Bold="True"><%# _rm.GetString(ResKeys.SmtpServerLabel) %></asp:Label>
                                        </td>
                                        <td style="text-align: right">
                                            <asp:TextBox ID="uiSmtpServer" runat="server" Width="200px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" style="text-align: justify">
                                            <asp:Label ID="uiSmtpServerComment" runat="server"><%# _rm.GetString(ResKeys.SmtpServerComment) %></asp:Label>
                                            <br />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="uiSmtpAccountLabel" runat="server" Font-Bold="True"><%# _rm.GetString(ResKeys.SmtpAccountLabel) %></asp:Label>
                                        </td>
                                        <td style="text-align: right">
                                            <asp:TextBox ID="uiSmtpAccount" runat="server" Width="200px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="uiSmtpPasswordLabel" runat="server" Font-Bold="True"><%# _rm.GetString(ResKeys.SmtpPasswordLabel) %></asp:Label>
                                        </td>
                                        <td style="text-align: right">
                                            <asp:TextBox ID="uiSmtpPassword" runat="server" TextMode="Password"
                                                Width="200px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="height: 24px">
                                            <asp:Label ID="uiConfirmSmtpPasswordLabel" runat="server" Font-Bold="True"><%# _rm.GetString(ResKeys.ConfirmPassword) %></asp:Label>
                                        </td>
                                        <td style="height: 24px; text-align: right">
                                            <asp:TextBox ID="uiConfirmSmtpPassword" runat="server" TextMode="Password" Width="200px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" style="text-align: center">
                                            <asp:CheckBox CssClass="checkBox" ID="uiSmtpSSLEnabled" runat="server" Font-Bold="True" Text="<%# _rm.GetString(ResKeys.SmtpSSLEnabledCheckBox) %>" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" style="text-align: justify">
                                            <asp:Label ID="uiSmtpAccountComment" runat="server"><%# _rm.GetString(ResKeys.SmtpAccountComment) %></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                            </asp:WizardStep>
                            <asp:WizardStep ID="WizardStep6" runat="server">
                                <table style="border-right: black 1px solid; border-top: black 1px solid; border-left: black 1px solid; width: 700px; border-bottom: black 1px solid" bgcolor="lightgrey">
                                <tr>
                                <td style="text-align: justify">
                                    <asp:Label ID="uiCommentBeforeSave" runat="server"></asp:Label>
                                </td>
                                </tr>
                                </table>
                            </asp:WizardStep>
                            <asp:WizardStep runat="server" StepType="Complete" Title="Finished">
                            </asp:WizardStep>
                        </WizardSteps>
                        
                    </asp:Wizard>
            
                </td>
            </tr>
            <tr>
                <td style="text-align: center">
                    <asp:Label runat="server" ID="uiError" ForeColor="Red" Visible="False" EnableViewState="False"></asp:Label> <br /> 
                    <asp:Label runat="server" ID="uiExceptionMessage" ForeColor="Red" Visible="False" EnableViewState="False"></asp:Label>
                </td>
            </tr>
                
        </table>
        
    </form>
</body>
</html>
